var encoding = require('encoding')
var xdb = require('xdb')

function main() {
  xdb.new('zcx', `/database/zcx`)
  const document = JSON.parse(encoding.from(payload.body))
  result = xdb.setDocumentByID(
    'zcx',
    'user',
    document.id,
    'status',
    document.status
  )
  return result
}
